package com.iltgcl.echovoicedemo.speaker

import android.media.AudioManager
import com.iltgcl.echovoice.client.IEchoVoice

/**
 * 用于读屏类应用，由于读屏类应用会根据设置项来控制音频焦点，故无需特殊处理
 */
class A11ySpeaker (
    audioManager: AudioManager,
    echoVoice: IEchoVoice) : EchoSpeakerBase(audioManager, echoVoice, IEchoVoice.USAGE_A11Y){

    override var focusLossTransientPolicy = IEchoSpeaker.AUDIO_FOCUS_LOSS_TRANSIENT_POLICY_NONE

    override fun requestAudioFocus(audioManager: AudioManager)= AudioManager.AUDIOFOCUS_REQUEST_GRANTED

    override fun abandonAudioFocus(audioManager: AudioManager)= AudioManager.AUDIOFOCUS_REQUEST_GRANTED
}
